import config from '../../utils/config';
import apiCreator from '../../utils/apiCreator';

const api = apiCreator();

export default {
  //结果查询获取估值时间下拉
  getTime: (query) => api.get(`${config.interfaces.type16}valuationanalysis/getTime`, query),
  // 结果查询详情及列表
  findanalysis: (query) => api.get(`${config.interfaces.type16}valuationanalysis/findanalysis`, query),
  // 估值解析保存
  saveValuateAnalysis: (query) => api.post(`${config.interfaces.type16}valuationanalysis/saveanalysis`, query),
  // 查产品代码下拉
  valuationCheckProductInfo: (query) => api.get(`${config.interfaces.type5}portfolio-server/valuationanalysis/productInfoWithNoValuationCheck`, query),
  // 查估值列表
  getAnalysisTable: (query) => api.post(`${config.interfaces.type16}valuationanalysis/findAll`, query),
  // 查申请记录
  getAnalysisRecord: (query) => api.get(`${config.interfaces.type16}valuationanalysis/applicationRecords`, query),
  // 新增解析
  addAnalysis: (query) => api.uploadFile(`${config.interfaces.type16}valuationanalysis/save`, {}, query),
  // 查批量申请异常列表
  getAbnormalData: (query) => api.post(`${config.interfaces.type16}valuationanalysis/findBatchErrorInfo`, query),
};
